package com.chinasoft.reposearch.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chinasoft.reposearch.entity.po.LanguageCount;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface LanguageCountMapper extends BaseMapper<LanguageCount> {
    @Select("select language, year, SUM(count) as count from language_count where language = #{language} and year between #{start} and #{end} group by language, year")
    List<LanguageCount> selectListYears(String language, Integer start, Integer end);
}